using System;
using System.Collections.Generic;
using System.Text;

namespace Mud.Common.Messages
{

    /// <summary>
    /// Represents an object that can be serialized into bytes for transmission.
    /// </summary>
    public interface IMessage
    {

        /// <summary>
        /// Represents the type of message so that it can be deserialized.
        /// </summary>
		int MessageTypeId
        {
            get;
        }

        /// <summary>
        /// Serializes the message for transmission.
        /// </summary>
        /// <param name="package">Package to use for serialization.</param>
        void Serialize(BytePackage composer);

        /// <summary>
        /// Deserializes serialized data back to the message.
        /// </summary>
        /// <param name="package">Package to use for deserialization.</param>
        void Deserialize(BytePackage composer);

    }
}
